﻿#region Copyright ©2008-2011, Technische Universitaet Muenchen
// ====================================================================================================
//
// Last Changed by       $Author: then $
// Last Changed Date     $LastChangedDate: 2009-06-09 09:28:29 +0200 (Tue, 09 Jun 2009) $
// Last Changed Revision $Rev: 185 $
//
// ====================================================================================================
#endregion

using System.Collections.Generic;

namespace Tum.CollabXT.SPEM
{
    public class ProcessElement : IProcessElement
    {
        public string Id
        {
            get; set;
        }

        public string Name
        {
            get; set;
        }

        public string Description
        {
            get; set;
        }

        public Dictionary<string, object> ExtendedData
        {
            get { return _ExtendedData; }
        }
        private Dictionary<string, object> _ExtendedData = new Dictionary<string, object>();


        public override string ToString()
        {
            return Id + " (" + Name + ")";
        }

        public override bool Equals(object obj)
        {
            if(obj is ProcessElement)
                return Id.Equals(((ProcessElement) obj).Id);
            return false;
        }

        public override int GetHashCode()
        {
            return Id.GetHashCode();
        }
    }
}
